package com.lagou.cl.servlet;

import com.lagou.cl.pojo.Request;
import com.lagou.cl.pojo.Response;
import com.lagou.cl.util.HttpProtocolUtil;

import java.io.IOException;


public class Demo1Servlet extends AbstractHttpServlet {

	@Override
	public void doGet(Request request, Response response) {
		String data = "first Servlet";

		try {
			response.out(HttpProtocolUtil.get_200(data.length()) + data);
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

	@Override
	public void doPost(Request request, Response response) {
		String data = "first Servlet";

		try {
			response.out(HttpProtocolUtil.get_200(data.length()) + data);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
